'''
with open(r"./1js.txt",encoding="utf-8") as f:
    data=f.read()
print(data)
'''
f2=open(r"./1js.txt",encoding="utf-8")
data2=f2.read()
print(data2)
print(type(data2))
print(','.join(data2))
sites_count=0
name_count=0
for i in range(len(data2)):
    if data2[i:i+7]==r'"sites"':
        sites_count=sites_count+1
    elif data2[i:i+6]==r'"name"':
        name_count=name_count+1
print("sites_count=",sites_count)
print("name_count=",name_count)

obj_in_json_list_count=0
json_list_count=0
for i in range(len(data2)):
    if data2[i:i+3] in (r'":[',r'": ['):#无法解决当"sites":   [有多个空格时出现的问题。
        json_list_count=json_list_count+1
print("json_list_count=",json_list_count)
        
